const mongoose = require('mongoose')
const { Schema, model } = mongoose

const HomeDramas = new Schema({
    type:{
        type:String,
        enum:['top','daygood','playergood'],
        require:true
    },
    id_drama:{
        type: Schema.Types.ObjectId,
        ref:'Dramas',
        require:true,
    },
    num:{
        type: Number,
        min:0,
        max:20,
        require:true
    }
    
}, { timestamps: true, versionKey: false })

module.exports = model('HomeDramas', HomeDramas, 'HomeDramas')